A case statement matches a value against patterns and runs the selected branch. Terminate a branch with two semicolons and close the statement with esac. A final star pattern handles inputs that don't match a named mode. Without a default, an unknown action can appear to succeed while doing nothing.
The tasks use a small dispatcher so you can compare the requested action with the fallback and preserve the script for another caller. Patterns are checked in order, and the first matching branch runs. A broad * placed first would catch every value and hide later named branches. You can put alternatives in one branch with a vertical bar. Keep the input expansion quoted, then inspect the selected output for both a recognized action and an unknown one.