title: How to use SQL Select statement with IF EXISTS sub query?
body: <p>How to select Boolean value from sub query with IF EXISTS statement (SQL Server)?</p>
  
  <p>It should be something like :</p>
  
  <pre><code>SELECT 
    TABEL1.Id, 
    NewFiled = (IF EXISTS(SELECT Id FROM TABLE2 WHERE TABLE2.ID = TABEL1.ID) 
                   SELECT 'TRUE' 
                ELSE 
                   SELECT 'FALSE') 
  FROM TABEL1
  </code></pre>