One example would be if you have data corruption in the database tables and an upgrade introduces a schema change, that won’t fix it, if anything it will make the issue worse, and possibly cause further data corruption.
Another example could be that your site gets hacked, the hacker messes with various database entries causing areas of the site not to work. Upgrading will certainly not help.
Sure there are also cases where an upgrade could help, one example would be when the cause of an error is due to the work load put onto the server (queries, page requests, etc..), and the software being updated has code enhancements in the new verion that lessens the server load.
It’s Apples for Oranges really, but i personally find upgrading is not a cure to fixing problem installations, tracking down the cause of the problem usually leads to the best solution (sometimes that solution maybe to upgrade, but not generally impo).
—
To summarize on the solution to the question asked (for anyone arriving here later), you can check via the DB options table, the option named version
contains the current version, or alternatively check the version in wp-includes/version.php
.