Depend on yours rating
Which is the most important to study: Openings Middlegame or Endgame

As commenters above have stated, below elo 1800,if one must choose where to put the majority of their study time, then the answer is easily endgame study---this is where everything else you have done pays off...or not, depending upon how much you know.
Endgames!
If you can make it to the last phase, on equal or better footing, then you have already, somewhat mastered the Opening and Mid games.