No disrespect but your question is an example of why beginners are often told to forget about learning openings in any detail, just to concentrate on opening principles.
You should always play your move based on the position of the board in front of you. That goes for the opening moves as well as the endgame.
Learning a set of opening moves without understanding their significance is no way to learn chess. At casual play level openings go off book very quickly and you will be lost just as fast.
Let's say a game starts with an opening and on move 5 opponent steps outside of opening book? Should you continue playing some moves from the opening book or make your moves based on how his last move affects the game as you see it?