I climb in the gear appropriate to the hill for me, how I feel on the day, weather conditions etc. There is no hard and fast rule. For most climbs I'll be on the small ring and mid to low range on the cassette but there are days when I might ride the same hill on the big ring. I don't have a hard and fast rule.
For me the key is to relax, spin up the hill and avoid pushing hard. I achieve this by selecting my chosen gear as I approach the climb, sit back, hold the middle of the bars and relax my upper body and arms. Settle in to a rhythm and try to avoid breaking that rhythm. If the climb is feeling hard or has a particularly brutal section I will stand to relieve my muscles. Do this smoothly. Learning when and where to attack a section can be valuable. Disciplining myself to ride like this has taken, and still does, a lot of effort as it goes against my instincts to attack.
A couple of small tips. I angle my heels downward so I push more in to the pedal and the climb. I can actually feel the extra power I gain. Try to avoid changing gear during a climb. If I hear someone change gear behind me I know I'll probably drop them as it can interrupt the rhythm of the climb.
On big climbs I breathe hard but I never gasp and would expect my breathing to be back to normal in a minute or so.
I have friends who've asked for help and I've explained my technique. Some have adopted it and find it works for them. I have noticed the difference in them.
Different people have different approaches. I regularly ride with one of the best climbers in my club. His strength is an ability to sit in and maintain a pace, my natural strength is a more explosive pace. I regularly reach the top of short sharp climbs first but he will always be first on long climbs, usually by 50-100 metres. On a recent trip to the Lakes where all our rides where on the golden ratio I crested every short climb first but on the big ones, Hardknott, Corney Fell, Wrynose, etc. my buddy was first. No matter how hard I discipline myself I never hold quite enough in reserve to maintain my pace.
I love to ride hills, attack them and attempt PBs. It's a fun thing not a competitive one. My best times always come when I relax, if I arrive at a climb determined to smash my PB I may well fail to do so.
Relax is the key word.