title: How to compare with Case in Where clause
body: <p>Here am having Person and Address Tables .Some Persons may have address or not.If they have address then want to join address table otherwise no need to join.Please help to solve this case.</p>
  
  <pre><code>select p.name,nvl(a.address,'address not available') from person p,address a
  where p.id = 2 and case
              when p.addid is not null
                then   p.addid = a.id
               else 0=0 end   
  </code></pre>