how do I use a multiplexer to select a logic function to use?
I don't know how to code... 


RTL?  you could use a case statement.  Does it specify how many selection bits to use?  you need 2 selection bits for 4 inputs, but if it explicitly states 4 selection bits, it is probably trying to teach you about one-hot encoding... maybe, or possibly unused inputs.