How to use Wildcards (Pattern matching) to filter query results