title: SQL:Conditional Operator in SQL Join Condition
body: <p>I was trying to Join two tables based on certain conditions , one of the condition is if my Column Flag contains value=1 then i use "=" operator otherwise "&lt;>"</p>
  
  <p>This is basically I want to do :</p>
  
  <pre><code>Select A.* from Table1 A Inner Join Table2
  On A.ID Case Flag when 1 then = else &lt;&gt; end B.ID
  </code></pre>
  
  <p>Of course this syntax is incorrect but this is what i want to do.</p>