Use an OPENROWSET Execute SQL task to select the data.
Map the result of the Execute SQL task to a variable.
Use the variable as part of an Expression (SQLStatementSource) for your next Execute SQL task ...
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel