Use sel as an unsigned index into inputs. Values 0 through 8 select that input bit; values 9 through 15 produce zero.