welcome.... a few more details would help but at a guess
If you are replacing a trim switch then you will need a 3 way toggle non maintained center return (the switch moves up or down and returns to center)
the top pin when mounted should be the green wire (down), then middle pin should be red (12vdc+), bottom pin should be blue (up).
when the switch is push down the internal contacts join the red to the green, up joins the red to the blue.