Dynamic Dropdownlist

Hello how could i go about and just show specific Items from the dropdown Array according to the value of a slider? I got the part "if slider == 7 then" but dont know further, ideally it would be "... Then show item 4 to 8" for example..