you can eliminate case by putting a mapping table with two fields like (perfid,perfmeasure)
and you can put values inside it
then above CASE statement can be dispensed with and instead you'll add a join to table created as
INNER JOIN MappingTable mt
ON mt.perfid = number
...
and in your select include mt.perfmeasure instead of CASE..WHEN
by implementing it as above its scalable also as for for each new measure value addition does not require you to modify the procedure but just need to add a new insert statement to add the value to table
------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/