I've got some ints (1-6) that I need to convert and map to say 1a, 2b, 3c, e.g. strings.
For normal mapping to ints I'd just use
SELECT SomeInts, case when SomeInts = 1 THEN 2 when SomeInts = 2 THEN 3 ELSE 999 END AS SomeIntsNEW FROM SomeTable
But if I try to change the first THEN to '2a' I get this:
Conversion failed when converting the varchar value '2y' to data type int.
I've tried various variants over cast/convert but none worked.
Whats the right syntax?