Set default status code by workflow/state

I have a requirement to set the default status code by specific workflow and state. The default status code is set in an environment variable.

Workflow A and State A = Status S0

Workflow B and State C = Status S2

Can this task be done using a Select statement in the appropriate environment variable. I would need to identify the workflow and state variable names.

Any help/suggestions would be appreciated.