I would probably use a NULL to represent uncalculatable, but it depends upon your intent in your problem domain (code expanded to show what's going on):
SELECT SUM(convert(decimal(3,2),
CASE WHEN Status_ID = 1 AND State_ID = 14 THEN 1 ELSE 0 END)
)
/
NULLIF(
SUM(convert(decimal(3,2),
CASE WHEN State_ID = 14 THEN 1 ELSE 0 END)
)
, 0
)
* 100
FROM SomeTable
The result when there are no rows in the table so the denominator would be zero - gets converted to NULL so the whole expression ends up NULL.
That code can also be simplified a little (probably because it's already a simplified toy problem):
SELECT SUM( convert(decimal(3,2), CASE WHEN Status_ID = 1 THEN 1 ELSE 0 END) )
/
NULLIF( convert(decimal(3,2), COUNT(*)), 0 )
* 100
FROM SomeTable
WHERE State_ID = 14
As an example of combining a number of different things into one query:
SELECT CASE WHEN State_ID = 14 THEN 'State_ID = 14'
WHEN State_ID IN (1, 2, 3) THEN 'State_ID IN (1, 2, 3)'
ELSE 'DEFAULT'
END AS Category
,SUM(convert(decimal(3,2),
CASE WHEN Status_ID = 1 THEN 1 ELSE 0 END)
)
/
convert(decimal(3,2), COUNT(*))
* 100
FROM SomeTable
GROUP BY CASE WHEN State_ID = 14 THEN 'State_ID = 14'
WHEN State_ID IN (1, 2, 3) THEN 'State_ID IN (1, 2, 3)'
ELSE 'DEFAULT'
END