Sql – Select a dumthe column with a dumthe value in SQL


I have a table with the following

col1   col2
 1      A 
 2      B
 3      C
 0      D


col1   col2  col3
0       D     ABC

I am not sure how to go about writing the query , col1 and col2 can be selected by this

select col1, col2 from Table1 where col1 = 0;

How should I go about adding a col3 with value ABC.

Best Solution

Try this:

select col1, col2, 'ABC' as col3 from Table1 where col1 = 0;