You can use either of the ones.

Update emp e
set sal = sal + (select case when sg.grade = 1 then sal * 0.4
when sg.grade = 2 then sal * 0.3
when sg.grade = 3 then sal * 0.2
when sg.grade = 4 then sal * 0.1
end
from salgrade sg
where e.id = sg.id);

update (select e.sal,sg.id,
(case when sg.grade = 1 then sal * 0.4
when sg.grade = 2 then sal * 0.3
when sg.grade = 3 then sal * 0.2
when sg.grade = 4 then sal * 0.1
end) new_sal
from emp e, salgrade sg
where e.id = sg.id) p
set p.sal = p.sal + p.new_sal;

By

Vamsi