Within a process, you can use a loop.
type Switches is range 0 to 15;
shifting : PROCESS(switch)
VARIABLE highest_switch : Switches := 15;
begin
for i in Switches loop
if switch(i) = '1' then
highest_switch := i;
end if;
end loop
...
end process;
Notice that if several switches are set, the variable is assigned multiple times. However as the loop is executed in increasing order, the last (highest) assignment wins.
Incidentally this process, like yours is combinational, but I removed unnecessary signals from the sensitivity list. It would be better to make it synchronous;
shifting : PROCESS(clk)
begin
if rising_edge(clk) then
for i in ...
end if;
end process;