It would be best in your interest to opt for teaching once you retire from the defence service but you would be required to enhance your qualification at least a ME degree from a recognised university. The best recourse would be to join some private college to work as a capacity of lecturer in your stream ie Electrical - engineering and simulteneously prepare you ME in some colleges having provision of Evening - classes. If you feel some sort of inconvenience with such a persuasion, you may do the same with the distance - mode preferably through IGNOU. This university is pioneer in terms of imparting quality education in the different spheres. Once you complete the same with an aggregate of 55 percent marks, you become eligible to appear for NET test conducted by CBSE. The same test consists of two papers first one include current affairs, Reasoning and some Numerical - mathematics and the second paper would deal with your stream with which you have passed your Engineering.
Upon passing the said test, you will have the chance of joining as a lecturer in a constituent college. Later, you can go ahead for the doctorate degree for better career prospects in the teaching line.
If interested for being a school teacher, you will have to persue B.Ed either through the regular mode or through the distance one from a recognised institution. Even though B.Ed would take time in completion, the end result by joining a school as a teacher may not stimulate you much. The first option seems to be prudent.