In my select statement, two columns will be returned.
ID | IDParent
Then, in my programme, I must determine whether IDParent is less than 1 before using ID ELSE before IDParent.
Is there a way to use an If Else like condition in SQL to return only a single value?