It seems you may be seeking a solution similar to what we call "Data Driven" virtual services.
The search feature in the Communities will help you find some additional information, and the product docs provide some discussion on how to use this technique as well.
Several links worth researching are:
- Data-Driven Virtual Services - DevTest Solutions - 9.1 - CA Technologies Documentation
- Data-Driven Virtual Services - DevTest Solutions - 9.5 - CA Technologies Documentation
- Data Driven Virtual Service and Workstation
- Examples of data-driven virtual services
- Data driven service virtualization
I have also seen implementations where teams store / query response information in / from a database table using a JDBC step in the VSM. The query results are placed in the response and sent to the consumer. Your solution will likely depend on the audience and their experience level.
Take care if you plan to use this approach as part of performance testing scenarios. You could inadvertently add latency to your service.