Start different scripts via slider control

Hello,
I have a ceiling fan at home that works by radio remote control and has 6 levels.
I have connected it to Home Assistant via Broadlink.
I now have a separate script for each level.
Switching by button also works without problems.
However, I have now built a slider in dashboard.
This runs via “input_number.fan” and can accept values from 0 (off) to 6.
I would like to use it to control the ceiling fan.
If the slider is set to 3, then the script starts with level 3, if it is set to 0, then the script for switching off is started.
At least that’s what I thought.
I then wanted to create an automation, but “if … else if … else if … else” does not exist.
How could I implement such a control?

The if else ladder can also be made, but the best fit to what you need is called choose: