I have the following table:
The values in the table are (1,2), (2,3) and (3,1).
I would like to select intUserIds from table who are associated with 2.
So in my case I would get the result 1 and 3.
I used a query saying:
SELECT intUserId1, intUserId2 FROM tableA WHERE intUserId1 = 2 OR intUserId2 = 2.
The problem is that this query always returns two columns, one of them being value 2. How can I select only the columns associated with 2?
Thank you in advance,