CASE
is an expression that returns exactly one value and all of the branches must yield compatible types. A string (even a blank string) is not compatible with a decimal, so you need to do something like:
CASE WHEN ... THEN '' ELSE
CONVERT(VARCHAR(32), COALESCE(CONVERT(DECIMAL(23,12), ... ,0)) END
Note that this hack will only work if you are presenting the data to an end user. If you are trying to store this data in a column or use it in other calculations, it too will be tripped up by the blank string. A number can't be a blank string:
DECLARE @i INT = '';
SELECT @i;
Result:
0
So, if you don't want "empty" numerics to be interpreted as 0, stop being afraid of NULL
and if you are dealing with this at presentation time, have the presentation layer present a blank string instead of NULL
.