Dynamic SQL is useful for situations where you do not know the full text of some or all of the SQL statements your application will require at runtime.
For example, dynamic SQL would be useful for a spreadsheet-driven application where a user interactively types one or more formulas into the cells.
These formulas are then translated into SQL statements that retrieve the data needed to perform the calculations specified by each spreadsheet formula.
Because you cannot know in advance which SQL statements are required to support the ad hoc formulas the user may type, you should code the application using dynamic SQL features to support the dynamic requirements of the spreadsheet.