It is better to avoid dynamic SQL if possible, is true. For a more detailed discussion, see this SO thread. However, to address specifically your question: the EXEC ('SELECT d21 FROM t1')
statement would behave exactly as if a request from the client containing the script SELECT d21 FROM t1
was received by the server. If the plan is already in the cache, it will be executed from the cache (sparing some details like metadata version changes etc etc). If not, it will be compiled, a new plan created, and run. Note that a query like SELECT field FROM Table
is what is called a 'trivial plan query', the cost of generating a plan for something like this is completely negligible on most systems.