Dynamic Dropdown

Hello,
I have given an option in my config.xml to allow user to select either a text field or a dropdown. I want to put a condition that if the user selects dropdown then the user can add options for the dropdown to be shown in the index.html.twig file. How do I do this?