If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
I'm assuming that customer_type may or may not contain the character 'B'.
For SQL Server
Code:
SELECT CASE customer_type
WHEN 'B' THEN 'Business'
ELSE 'Non Business'
END
FROM CUSTOMER_TABLE
OR
SELECT CASE WHEN customer_type = 'B' THEN 'Business'
ELSE 'Non Business'
END
FROM CUSTOMER_TABLE