Hi,
Your approach is right - macros are not supported in ASCX transformations so, you need to resolve them using the AP - ResolveMacros.
Also, the quotes have to be escaped due to the protection against SQL injection.
Anyway, you can try using this syntax:
WhereCondition=<%# "<columnName>='" + CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros("<macro>") + "'" %>
Best regards,
Juraj Ondrus