CREATE TABLE c_user (id INT, first_name VARCHAR(50))
INSERT INTO c_user VALUES (1,'Neeraj')
INSERT INTO c_user VALUES (2,'Vishal')
SELECT * FROM c_user WHERE id in (1,2)
UPDATE c_user
SET first_name = CASE
WHEN id = 1 THEN fn.f2
WHEN id = 2 THEN fn.f1
END
FROM c_user
OUTER APPLY
(
SELECT cu1.id cu1id, cu1.first_name f1, cu2.id cu2id, cu2.first_name f2
FROM c_user cu1,c_user cu2
WHERE cu1.id = 1 AND cu2.id = 2
) fn
WHERE c_user.id = fn.cu1id OR c_user.id = fn.cu2id