I am attempting to get an equivalent of DECODE function in MySQL. It operates like this:
Select Name, DECODE(Age,
'Adult') AS AgeBracket
The DECODE function will compare the value of the column 'Age' with 13, 14, 15.. and return the appropriate string value 'Thirteen', 'Fourteen'.. and if it matches with nothing, then default value of 'Adult' will be returned.
Any ideas which function in the MySQL can do this same work?
CLARIFICATION: I agree using CASE is one way of achieving the desired result, however I am rather looking for a function because of performance and other reasons.