N-Channel MOSFET as 12 VDC switch
For this situation (not knowing what the load will be) it's better to use a P Channel FET as a "high side" power switch.

The PFET should be pulled up to 12V to turn it off, with a resistor, and the 5VDC USB signal can be used with a simple NPN transistor to pull the PFET gate to 0V and thus turn it on. 







simulate this circuit &ndash; Schematic created using CircuitLab