This syntax is incorrect:
(ClassName = 'myclass.name') and {%GetSomething())%}
You have an extra closing ) you need to remove before the closing macro.
Secondly, you may have to suffix your clause with a macro parameter:
(ClassName = 'myclass.name') and {%GetSomething()|(handlesqlinjection)false%}
because it may automatically try to SQL escape the value you're adding.