Selecting constants without referring to a table is perfectly legal in an SQL statement:
SELECT 1, 2, 3
The result set that the latter retu
This way can help you
SELECT TOP 3
1 AS First,
2 AS Second,
3 AS Third
FROM Any_Table_In_Your_DataBase
Any_Table_In_Your_DataBase:
any table which contains more than 3 records, or use any system table. Here we have no concern with data of that table.
You can bring variations in result set by concatenating a column with First, Second and Third columns from Any_Table_In_Your_DataBase
table.
SELECT 1, 2, 3
UNION ALL SELECT 4, 5, 6
UNION ALL SELECT 7, 8, 9
In Oracle
SELECT
CASE
WHEN level = 1
THEN 'HI'
WHEN level = 2
THEN 'BYE'
END TEST
FROM dual
CONNECT BY level <= 2;