Trigger query based on dynamically generated query name

Is there any way to trigger a query based on a dynamic variable name?

I have a list of items and I need to trigger a different query based on the item name. Since the item name is a string, the string.trigger is throwing an error. Any ideas?

an array of function pointers possibly?

var funcs = [ 
    function() { alert("foo"); }, 
    function() { alert("bar"); }, 
    function() { alert("baz"); } ];

funcs[0](); // "foo"

code sample from here

heres another SO post where common misconceptions, errors and bugs are mentioned/discussed.... let me know if you need more help though