This post won’t solve everything, but:
Case-markings can be words; when they are, they are usually called “adpositions”, or sometimes “
. (Goddam autocorrect)
“Prepositions” always come just before the first word of their object noun-phrase;
“Postpositions” always come just after the last word of their object NP;
“Inpositions” sometimes come between words of their object NP, for instance,
* just after the first word, provided that’s not always the head noun, or
* just before the last word, provided that’s not always the head noun.
And there may be other kinds of adpositions.
Case-suffixes and case-prefixes usually come from postpositions and prepositions, respectively, or at least from words or clitics that might be so considered. Tagalog has case-infixes. Some 3Cons natlangs have some case-transfixes. There are languages with morphological tone that have case-tones. And there are other case-suprafixes, such as chronemes (chronofixes?) and stressemes.
Adpositions can come from nearly any part-of-speech. I think I’ve read they’re likelier to come from adverbs than from any other source ancestor-word; but I know they sometimes come from adjectives or nouns or verbal auxiliaries or even verbs.
Edit: ”Ago” (English’s only postposition) comes from a verb.
Possibly (?) you could get a case-affix directly from an adverb, or some other part-of-speech, without going through the “adposition phase”.
Some cases are “ad-verbal”, in that they tell the relationship between the cased noun and some verb (usually the main, nuclear verb of the clause); some are “ad-nominal”, in that they tell the relationship between the cased noun and some other noun.
Some cases are “syntactic”, in that they tell the syntactic role played by the cased noun in the clause or phrase, regardless of its semantic role; some are “semantic” in that they tell the semantic role played by the cased noun.
Nearly all cases mean more than one thing. Some grammarians won’t call whatever system a natlang has, a “case system”, unless at least one of its cases has both a syntactic use and a semantic use.
To mention just four cases;
“Nominative”, “Accusative”, “Dative”, and “Genitive”, are all usually used as, and/or considered as, syntactic cases.
NOM and ACC and DAT are (principally) ad-verbial; GEN is (mostly) ad-nominal.
Will that start you off?
You could check out and read Barry J. Blake’s book “Case”.