I consider myself to be an intermediate player. I understand the tactical motifs well and can solve quite a few tactical puzzles with relative ease. I have also dedicated time at working on end games and can handle the basic ones with major and minor pieces as well as the ones involving pawns decently.
Lately I have been paying a lot of attention at the tactical problems that I get wrong and I have noticed that for the most part, the reason of my mistakes is that I don't know how to correctly evaluate the resulting position correctly to pick the right move.
For example: I don't really have a diagram but the question is more general than specific so, please bear with me. In a recent one I found the correct first move and on the second one I chose to exchange a knight for a rook thinking I would end up with an advantage in quality. That turned out to be a mistake. The right answer was to take a bishop which made the queen to take my knight which was defended. I kept thinking "why on earth would the queen take the knight if it is going to be taken? It makes no sense".
I know that the right answer boils down to the specific position, even when analyzing it with the engine I could see that in this case, by taking the rook the advantage was completely lost and if the other side did not take with the queen, the advantage I had would rise exponentially.
My questions would be, how can I learn this stuff? What kind of sources do I have to look for? What subject should I Google? What kind of books, or better yet, titles can I read so that I can start understanding this?