coba ini
SELECT CASE
WHEN ColumnName = 'value1' THEN 'answer1'
WHEN ColumnName = 'value2' THEN 'answer2'
WHEN ColumnName LIKE '%TEST%' THEN 'answer3'
END AS Answer
FROM TableName
contoh yang dapat Anda jalankan
SELECT name,CASE
WHEN Name = 'sysobjects' THEN 'answer1'
WHEN Name = 'syscols' THEN 'answer2'
WHEN Name LIKE '%p%' THEN 'answer3'
ELSE 'unknown'
END AS Answer
FROM sysobjects