title: Select Case in where Condition Help Required
body: <pre><code>Select PlotID, PlotName, PT.TypeName, B.BlockName, TownName, P.PricePlot, P.PriceMarla
  From Plots P
  Left Join PlotType PT ON P.TypeID=PT.TypeID
  Left Join Town T ON P.TownID=T.TownID
  Left Join Blocks B On p.BlockID=B.BlockID
  Where (Case When @IsSold = 'False' Then P.PlotID NOT IN (Select PlotID from SaleContract)
              When @IsSold= 'True' Then P.PlotID IN (Select PlotID from SaleContract)
              END)
  </code></pre>
  <p><strong>Need Help To resolve this query</strong>
  In and NOT IN not working in case after where statement, how can i resolve this.</p>