Unfortunately an ldap query that is querying 'memberof' has to use the full DN of the group.
The DN format will not accept wildcards of any kind, such as CN=SG-Sec1* - this is not valid.
In a simple LDAP filter passed to an app I'm afraid I don't think what you're asking is possible. If you had the ability to add logic via script then you could find the DN of the group and build the filter, but it sounds like this is not the case.
Tony