My database doesn\'t have a specific column so I created a column in my query by switch. What I need is to concatenate this column with another column in the database:
You just need to try +
operator or CONCAT
function
+
for all SQL Server versions
DurationType = ' + 'some text'
CONCAT
for SQL Server 2012 +
CONCAT('DurationType = ', 'some text')
Your query should be something like this
SELECT certificateDuration
,'DurationType = ' +
CASE certificateDurationType
WHEN 0 THEN 'Day'
WHEN 1 THEN 'Month'
WHEN 2 THEN 'Year'
END
FROM Scientific_Certification