What is the mechanism? In other words, how does the tRNA know whether the codon is in 5' to 3' direction? I also heard that anything that is translated from 3' to 5' direction is degraded. Is it true?
The tRNA is not acting alone, it has the help of the Ribosome.
The Ribosome assembles at the beginning of the transcript and starts the translation at the first AUG codon. It then binds the first tRNA which fits to the mRNA. The tRNA is then moved from the A-position to the P-position and the next tRNA is binding (the move around and bind by chance. A nice animation is found in the Wikipedia article on translation (which is also the source for the image above).
Translation can't go into the other direction, it is always in 5' -> 3'.
To recognize the right direction (and the right starting point) the Ribisome is not simply starting at the 5`end of the mRNA. Before the start codon AUG the mRNA contains a regulatory, untranslated region, the so-called 5'UTR. The end of the 5'UTR of eukaryotes contains the so called methylguanosine cap (and is only present in mature mRNA), in proaryotes this is done by the Shine-Delgano sequence. Both are recognized by the ribosome. After binding to the mRNA, the ribosome slides along the nucleotide chain until it reaches the first AUG to initiate translation. The image is from this description (which contains a lot more details, if you are interested in it).
I think that there is no reason in principle why early evolution couldn't have landed on a translation mechanism going 3'>5'. There are, however, clear biochemical reasons why the transcript itself has to be made in a 5'>3' direction. So in this alternative world where the initiation signals would have been at the 3' end of the mRNA, the message would have to be fully transcribed before the anti-ribosome could bind to these initiation signals.
In bacteria at least, translation is initiated at the 5' end of the mRNA even as it is being synthesised, and this rapid transcription>translation link may offer some advantages.