title: Search a value in another table if doesnt exist in the current
body: <p>I have a table and I want to search if there is a value inside a column. In case it doesnt exist I want to search it in another table.
  I tried this :</p>
  <pre><code> SELECT *,
      CASE(WHEN student = 'ted' THEN 'ted'
      ELSE ( SELECT student
             FROM  dbo.class2
             WHERE student= 'ted')) END AS ISOK 
      from dbo.class1 
  </code></pre>
  <p>So if <code>dbo.class1.student</code> isnt 'ted' the <code>ISOK</code> column will take the value from <code>dbo.class2.student</code>.</p>
  <p>Although the above query is wrong because it returns more values.</p>
  <p>I am pretty sure that the approach I am trying to do is wrong.</p>