On the one hand, as a military officer and following the principle of subordination to authority to the Chief Executive under its commander-in-chief power, he may be ordered by the President not to appear before Congress under the pain of court martial if he insists on doing so (Gudani vs Chief of Staff).
On the other, military officers have the duty to advise Congress on matters of professional expertise in accordance with the latter's duty to make legislative inquiries in pursuance of the legislative mandate. Further, the power of Congress to conduct legislative inquiries has been said to be broad and encompassing that it can demand officials of the executive to appear before it, except when executive privilege is invoked.
On the practical side, his career will surely suffer if he gets on the bad side of the two protagonists. Where is he to turn to? Is it possible to find a common ground and before a court order from the SC is issued? Senator Joker Arroyo, in a recent statement, said it is embarrassing to have another Supreme Court decision to decide on a tiff between the executive and the legislative.
As a matter of procedure, instead of demanding that military officers appear before Congress, why not ask their immediate civilian superior to appear before it? The Secretary of Defense, as the alter-ego of the president has the authority to speak on matters involving the armed forces and national security. In this way, we skirt the issue of placing military officers in a situation where politicians can pressure them to air their political views. In a perfect world, military officers should have no political views or they keep it to themselves lest they prejudice the subordination and loyalty required of them and demanded by their oath and commission. We all know that we don't live in a perfect world and we have one of the most politicized military on this side the free world. At the very least, the exchange between members of Congress and the Secretary of Defense will be as between politicians, not between a politician and a soldier.
If that cannot be implemented or the matter really needs the attendance of the military officer, unless executive privilege shall be invoked, military officers should attend legislative inquiries. The compromise really can be found in the manner and selection of questions to be propounded to the military officer. In this respect, Malacanang's position on the matter of prior knowledge of the line of questioning and general topic of the inquiry appears to be on the spot.