Quest System Help

Hiya, ok so I need to make a set of commands and functions so when an NPC is clicked it lists the name of the Quest in each slot. What I've Done: Ok so the NPC interaction is all setup with interactions so that's fine. As well as that it's all setup with assigning quests to each slot. How It Works: Each quest has it's own ID which can be assigned to a questslot i.e so if a player gets their first quest in the game QuestSlot1 will = 1, and the remaining 4 slots would be empty as they don't have a quest What I Need Help With: I am trying to run a function when you click an NPC called Quest Master which has him list the quest in each slot. How I was planning to do it was by having a function which is run which checks for each ID so an example for a line of code in that function would be: execute if score @s QuestSlot1 matches 1 run tellraw What is wrong: annoyingly I realised I would need to do it with each questslot i.e questslot 1,2,3,4, and 5 and that is a huge inconvienience with the amount of quests I plan to have so I was wondering if anyone has a solution they can think of for that If anyone has any Qs lmk 🙂
Continue to help post