Ms Sql Case Count Distinct Values