title: How to get if else statement in mysql query in WHERE clause?
body: <p>There is I am doing mistake in my mysql query. can anyone help me out??</p>
  
  <pre><code>select * from user_errors where user_id = '2' 
  IF( type = 'custom_type' ) second_user_id != '2' ELSE second_user_id = '2' 
  END IF
  </code></pre>