Well if you've got a PhD and joined the army (in Australia), you could join as an SSO (Special services officer), as opposed to a GSO (general service officer). You would be commisioned as a captain, but you would never lead troops, you would not be promoted and you would do that job only, so a doctor, lawyer or political analyst or something like that.
You get commisioned as an SSO so the army can stick you in an office and take advantage of the particular skill you have. You would do what we call "the knife and fork course" because it is only 2 weeks and your commisioned... so just enough time to learn to use a knife and fork. That is why you never get promoted, you never command anybody because the army has no interest in putting an SSO in a leadership position.