'Select integer column as corresponding letter of the alphabet

I have an int column that contains values no larger than about 20. I want to select as its corresponding upper case letter of the alphabet:

1 = A
2 = B
3 = C
...

I don't care what happens after Z because the column doesn't contain larger values. Is there a simple way to do this with a SQL query, to convert to a single-byte character like this?



Solution 1:[1]

Another alternative specific to MySQL using elt

select elt(col,'A','B','C','D','E','F',...);

Demo

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Phil Coulson