Simplifying Workflows with IF ELSE logic

I’m currently working on a workflow that utilizes form inputs to create and assign entitlements to roles. I’ve created the workflows to handle the logic from the form, but to get it working properly, the workflows have gotten quite messy and have many branches of logic.

The reason for the many branches is because I need to do a “compare strings” operation on one of the form inputs and set a certain assignment criteria in the role depending on what the input is. As of right now, there are 4 different potential values that I can set, so that makes 4 separate branches in the workflow to handle that logic. Does anyone know of a better way of handling this logic to be more consolidated and maintainable as time goes on? We plan on adding more values, so adding additional branches of logic for each new value would be a problem.

Here is what the workflow looks like currently:

Can you share your complete workflow script once. Few thoughts over here. If each compare string is calling same set of HTTP Request operations then you do not need to have seperate HTTP Request you can navigate to single HTTP Request operation and the rest of the steps.
Also you may not need those may success, failure steps you can keep one or two and navigate all the success and failed scenarios to that action.

I ended up using a lookup transform to handle this logic in there instead of having individual compare statements. This simplifies the logic to only one compare statement and allows for simpler maintenance of only needing to update the lookup if a new value needs to be added.