This model is renowned for the hard drive I/R cable failures. Apple was even replacing them for free for a while. Try changing out with this one:
+
This model is renowned for the hard drive I/R cable failures. Apple was even replacing them for free for a while. Try changing out with this one: https://www.ifixit.com/Guide/MacBook+Pro+13-Inch+Unibody+Mid+2012+Hard+Drive+Cable+Replacement/10379