If the hinges are on the same vertical line, then (as noted by @DA01) the hinge should stay wherever you leave it (absent wind, etc). If the hinges aren't vertically aligned, then the gate will want to swing towards a specific point. You can use this to solve your problem.
Imagine that the gate is swinging on a rod, and can go 360° around the rod. If the rod is vertical then you can put the gate anywhere you want and it will stay. However, if the rod is leaning towards a certain direction, then the gate will tend to swing until it is pointing in that direction (because the gate will be lower at that point).
What if you move the gate to the exact other side of the rod from where it wants to go? It will sit there, balanced. If you then move it in either direction it will continue to swing in that direction until it reaches its low point.
So, what you want to do with your gate is to align the hinges so that the hinge line leans away from the the middle of the gate's range (at 45°). That way the gate will tend to swing away from the 45° point, towards the nearer of 0° and 90°.
Edit: When you do this, you may have to readjust the position of the gate on its hinges in order to have the gate properly fit into its opening. But, once you adjust the post side of the hinges to get the right swing, changes to the gate side of the hinges won't affect the swing, so you won't have to readjust anything.
Based on your excellent diagram, I think these may be your ticket. They are designed for your very problem.
Disclaimer: I've never bought anything from the site in the link and I'm not endorsing them.
The Stoppa
![The Stoppa](https://i.stack.imgur.com/KfntB.jpg)
Best Answer
The long side of the hinge needs to be fixed to your cabinet door, align the hinge pin flush with the end of the door like the picture below
Make sure hinge faces the side you want the door to open to.