title: SQL SERVER 2005 IF ELSE
body: <p>I am running following query.</p>
  
  <pre><code>SELECT T1.C1, T2.C2..., 
  IF( T1.C1&lt;&gt;T2.C1,"Changed","1") AS NewColumn
  From T1 INNER JOIN T2
  Where condition..
  </code></pre>
  
  <p>I am getting syntax error for IF statement.</p>
  
  <p>Motive is to compare columns from two different tables, if not equal save as "Changed" in NewColumn of third table.. This is a <code>Insert INTO query</code>.</p>
  
  <pre><code>T-&gt; Table
  C-&gt;Column
  </code></pre>