SELECT UserId AS id FROM IndagateResult
WHERE (UserId = (SELECT Max(UserId ) FROM IndagateResult WHERE UserId < 741))
UNION ALL SELECT UserId AS id FROM IndagateResult
WHERE (UserId = (SELECT Min(UserId ) FROM IndagateResult WHERE UserId > 741))