You didn't describe engine type or set up. But you likely have a short or bad ground in the switch or wiring. To determine which, disconnect the trim wires at the throttle - should be green, blue, and red. Test red to ground to see if you have 12 volts. If so, then shunt red to green - motor should trim down. Shunt red to blue, motor should go up (or that could be vice versa, depending on your motor and how you're wired.) If all that works, you have a bad switch. Sometimes a couple sprays and soaks of WD-40 will fix it. Otherwise, it will need to be replaced, or you can wire in a seperate rocker switch. You can test the switch with a simple continuity check between the red terminal and the blue and green terminals on the switch, depending whether you push the switch to the up position or down position.
If that does not work, find where those wires go into the trim switch on the motor (or the fuse box - where ever they terminate) and check and clean the connections. If still no joy, check the continuity and resistence of the blue wire and the green wire from the termination point on the motor to the throttle. You should have good continuity and very low resistence. If not, wires need to be repaired or replaced. Follow them from the motor to the throttle and look for breaks, cracks, or corrosion.