Check this:
DECLARE @emp TABLE(id INT, [name] VARCHAR(30), [check] INT, deptname VARCHAR(30))
INSERT INTO @emp (id, [name], [check], deptname)
VALUES(100, 'a', 1, ' ceo'),
(100, 'b', 2, ' hr'),
(100, 'c', 3, ' po'),
(100, 'd', 5, ' no'),
(101, 'a', 1, ' pm'),
(101, 'b', 5, ' ceo'),
(102, 'a', 1, ' rn'),
(102, 'b', 2, ' han')
UPDATE t1 SET [name] = t2.[name]
FROM (
SELECT id, [name], [check], deptname
FROM @emp
WHERE id = 100 AND [check]=2
) AS t1 INNER JOIN (
SELECT id, [name], [check], deptname
FROM @emp
WHERE id = 100 AND [check]=5
) AS t2 ON t1.id = t2.id
DELETE
FROM @emp
WHERE id = 100 AND [check]=5
SELECT *
FROM @emp