I have a select statement which will return 2 columns.
ID | IDParent
Then in my program I have to test if IDParent is < 1 then use
if IDParent is < 1 then use
you can use CASE
CASE
SELECT ..., CASE WHEN IDParent < 1 THEN ID ELSE IDPArent END AS ColumnName, ... FROM tableName