The expression of morphological case in English is limited to a two-way distinction for some pronouns
Setting aside the issue of -'(s)-genitive constructions, which are not relevant to your question, English common nouns such as sword don't inflect for case. The only type of word that shows case inflection in English is pronouns: e.g. me, him, her, us, them are distinguished from I, he, she, we, they.
The historical distinction between accusative and dative case forms in English has been completely lost, so "accusative" and "dative" can no longer can be distinguished by form even for pronouns. Although the surviving forms are mostly descended from the Old English dative forms, and the surviving functions are descended from both the functions of the Old English dative case and the functions of the Old English accusative case, it is fairly common in the English grammatical tradition to use the term "accusative" by itself to refer to the surviving forms. This is I think why RegDwigнt♦ expressed confusion and disagreement in response to your wording "accusative/dative". My guess is that you are using "accusative/dative" not to refer to two separate alternatives, but as a two-part name for the case taken by pronoun forms such as me, him, her, etc.
Treating "instrumental" case as a third distinct category is another relic classification that is usually not made when discussing the grammar of modern English.
This distinction doesn't exist for the objects of prepositions, and as might be a preposition here
A general rule of English morphosyntax is that the object of a preposition can only take one morphological case form, the "accusative" form. (Setting aside the issue of coordinations involving pronouns, which show variable usage that has been explained in various ways.)
As mentioned in Greybeard's answer and in the comments, the word as can be argued to function in many contexts in modern English as a preposition. Some "prescriptivists" dislike this use of as or say that it is "incorrect", but the syntactic analyses that linguists tend to focus on are about explaining what the body of evidence from speakers of a particular language actually shows about usage ("descriptivism") rather than explaining what certain speakers say usage ought to be.
If we analyze as as a preposition, then according to this rule, a sword must be in a syntactic position that grammatically requires the use of the accusative morphological case-form in English (even though this morphological distinction is not actually marked on a sword).
To confirm that the analysis of as as a preposition is correct for sentences like your particular example sentence, you would have to construct a sentence like this where a pronoun with visible morphological case distinction comes after the word as. It seems difficult to do this naturally. Maybe something along the lines of "While I used boxes as medicine containers, she used bottles as them" could serve. I find this sentence highly unnaturally worded, but it seems notably more acceptable to me than *"While I used boxes as medicine containers, she used bottles as they."
If you're talking about "underlying" rather than morphological case, you need a theory of syntax that is sufficiently detailed to account for this construction
If by "case" you are not referring to anything expressed in the morphology of English, but to a purely syntactic phenomenon, then you ought to try to analyze the construction from the point of view of a modern theory of syntax. I don't know how to do that, so I can't offer anything as an answer in that case.