Error Grouping By Multiple Columns using CASE
I guess that when Type has a certain value ('Test'), you want the Structure and Description columns to be considered for the grouping but otherwise to not use them at all. This is one way to do this:

GROUP BY
    Type, Account,
    CASE WHEN Type = 'Test' THEN Structure ELSE '' END, 
    CASE WHEN Type = 'Test' THEN Description ELSE '' END


The '' should be a (any) constant expression that has the same datatype with Structure and Description respectively.

Alternatively, you could separate the 2 cases, which will give you more flexibility on adjusting the SELECT lists:

SELECT 
    ---
FROM
    ---
WHERE
    Type = 'Test'
GROUP BY
    Type, Account, Structure, Description

UNION ALL

SELECT 
    ---
FROM
    ---
WHERE
    (Type &lt;&gt; 'Test' OR Type IS NULL)
GROUP BY
    Type, Account ;