title: MySQL Joins With Case Statements
body: <p>I am having a bit of trouble with a query. I want to join tables if a case is met. This the query I'm working with. I'm kind of new to these case statements so any help is greatly appreciated!</p>
  
  <pre><code>      SELECT 
          conversation.c_id,
          conversation.user_one,
          conversation.user_two,
          users.name,
          users.lastName
        FROM `conversation` 
  
        CASE
          WHEN conversation.user_one = 1
          THEN
            INNER JOIN `users`
            ON conversation.two = users.id
  
          WHEN conversation.user_two = 1
          THEN
            INNER JOIN `users`
            ON conversation.user_one = users.id
        END CASE
  
        WHERE `user_one` = 1 OR `user_two` = 1
  </code></pre>