I'm trying to offload some work from the CF server to the SQL Server (2008).
I'm running a query and the statusID value that is returned corresponds to one of 4 colors (Green, Yellow, Orange, and Red).
select id, statusID
from table
If this is the ideal situation to use a case statement, is this correct?
select id,
case
when statusid in (1,20,24)
then 'red'
END as xxxx) as yyyy, *
from TABLE
And if this is correct, what goes into xxxx and yyyy above?