Well unfortunately you cannot use a variable in the from clause in a select statement like you have.
However, you can have a
string variable that you concatenate the query to the value of the table name of the current record in your cursor. Then take the string and use the dynamic query package to run the query for you.
Mark