My company has a product that is the answer to many questions on Stack Overflow. The product doesn't have real competition (it is a niche). What is the proper way to answer those questions?
I face the same situation sometimes, and what I try to do is explain how they can do this for free, or at least explain the overall approach you'd have to take without your product, and how the product makes that experience better (and be honest with yourself, there are very few problems in computing that can't be solved without some specific program, no matter how niche). Then you can explain specifically how the user could use your product to solve their specific problem. And I always add a disclaimer to the post that I work for the company whose product I'm pimping.
If you just post a link to your product, and consider that an answer, it will get obliterated by the community I suspect. Terse answers that just post a link to a commercial product should be a comment at best, and even that has a chance as being flagged for spam. It's usually much more appropriate to add helpful context.
Thar be dragons...
Be careful. One aspect of your question makes me think you are finding questions such as, "What is the best WIDGET program?", when you happen to sell a widget program.
The problem is, those questions tend to be old questions that just have not been seen since our question standards started to disallow such 'shopping' questions.
What this means is, posting an answer to such a question might not only get you in trouble with what Aaron's answer notes, but you might end up finding that since you have 'bumped' the question by answering it, it ends up getting closed.
I am focusing on 'shopping' questions here, because of the way you stated that your product "is the answer" to some questions. Nothing I say here is meant to contradict Aaron's answer.