UPDATE AnonymousTable SET Field_A = (CASE Field_A WHEN 'dog' THEN 'pug' WHEN 'bird' THEN 'owl' WHEN 'cat' THEN 'angora' ELSE Field_A END) WHERE Field_A IN ('dog', 'bird', 'cat');
In the WHERE clause, the ELSE clause in the CASE expression is optional or redundant - but including ELSE gives you reliability. One of the most serious mistakes is not to cover this โnone of the aboveโ alternatives and find that everything that was not mentioned is set to NULL.
source share