UPDATE table SET columnB = CASE fieldA WHEN columnA=1 THEN 'x' WHEN columnA=2 THEN 'y' ELSE 'z' END WHERE columnC = 1