Please define "it does not work". What exactly does that mean? Does it thrown an error, does it crash the console, does it bluescreen your domain controller, does it initiate a self-destruct, does it not return all expected results, does it not return some results, something else? We can't help if we don't know exactly what you mean.
What collection is this collection where the membership query exists limited to and what does it contain for members?
Also, this isn't your issue, but using multiple wildcards in a single condition in your WHERE clause is terrible for performance and has a huge impact on SQL performance. Avoid doing this at all costs. Given that you know the data, there is no reason to use a wildcard at all and you should just be checking if the property is equal to the desired value.