title: Choose to Select Value Between Two Columns in MySQL
body: <p>Just working on a personal project. I am trying to write an SQL query (<code>using PHP and MYSQL</code>) that selects the appropriate row from a table based on some condition. </p>
  
  <p>I've done a bit of research and have been fiddling with it for a few days but no luck. </p>
  
  <p>So, I have a table called Friendship_Request. Although the table has several columns, one of them is called <code>Requester_ID</code> and another column is called <code>Requestee_ID</code>. If one of the columns matches a value I pass in the query (say, <code>userID</code>) then I want the query to bring me back the value in the <strong>other</strong> column. For example,  </p>
  
  <p><a href="https://i.stack.imgur.com/kWU6X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kWU6X.png" alt="enter image description here"></a></p>
  
  <p>If I pass 200 as the userID then the query should bring back 201, 400 and 901. How do you do this? Does this have a name? I didn't even know what to Google. </p>
  
  <p>Thanks for your time.  </p>