How Dynamic SQL Can Be Static SQL Part 2
This article shows you how to use the CASE function to design single query solutions that have changing results depending on the values you assign to variables. These techniques are extremely useful as alternatives to dynamic SQL.