Instantiating module in condiotional block verilog
That's easy &mdash; put the multiplexer outside the module:

assign inp = sel ? inp2 : inp1;
moduleex s1 (inp, out);


You can even do it all in one line if you're so inclined, but this tends to be less readable:

moduleex s1 (sel ? inp2 : inp1, out);