I have a table as follows
UserID CONSUMERID
1 2
1 3
1 4
5 1
this is a lookup column, user can be consumer here.
I need to query the table and get a single column output so that for example if ID = 1 I should be able to query userid and get all consumnerid data where userid = 1 and at the same time query get all userid data where consumerid = 1.. all the results should come in one column. So in other words query both columns for 1 and return opposite column value.