title: MySQL if statement or case when with where condition
body: <pre><code>Table invitation (Primary key: invitation_id)                 
  
      ---------------------------------------------      
      invitation_id   send_user_id  receive_user_id     
      ---------------------------------------------      
       1                  2             1         
       2                  3             2           
       3                  2             7           
       4                  9             2
      --------------------------------------------- 
  </code></pre>
  
  <p>If <strong>send_user_id</strong> value is <strong>2</strong> then I need to get <strong>receive_user_id</strong> and if <strong>receive_user_id</strong> is 2 then I need to get <strong>send_user_id</strong></p>
  
  <p>How to get this ?</p>