How to use a dynamic SQL Select Statement for a field whose Data Type is a SELECT?

The situation is as follows, I want to store a single value in a field type identified as SELECT in a FORM application. But this field has the peculiarity of storing a value that will depend on the type of transaction desired and its search under the SELECT process will depend on it.

Example:

  1. Under the transaction type ‘EV’ the SELECT will be directed to search and use in the ‘CALENDAR’ table with specific fields.
  2. Under the type of transaction other than ‘EV’, the SELECT will be directed to search and use the ’CHARGES_NON_EVENTS’ table with specific fields.

Currently the SELECT is aimed at being a unique and static search, is it possible that a dynamic search can be done (search in a different table, depending on another registered value)?