CAST or Convert Within a SUM and Case
<p>Is it correct to implement a cast or convert in an aggregate SUM with a Case and if so, how would be the correct way to implement them? For example</p>

<pre><code>    SUM(CASE WHEN X = 'Y' THEN Z ELSE 0.00 END)
</code></pre>

<p>In this case Z would be Cast or Converted, it is Datatype numeric, I'd like to convert it to varchar</p>