Sometimes you might want to replace numbers with an enumerate value. ┬áLet’s take an example with a BIT field for HasChildren.

SELECT Name, IsParent
CASE
WHEN HasChildren=1 THEN ‘Parent’
WHEN HasChildren=0 THEN ‘Not parent’
ELSE ‘Unknown’ END AS IsParent
FROM Person