We use the nominative case when the noun is the subject of a sentence.
If you can’t tell which noun is the subject, ask which one is doing the verb.
A fox attacked the sparrow by the pond in the garden. There are four nouns here, but only one verb: to attack. The fox is doing the attacking, so fox is the subject of the sentence. In Latin, the word for fox would be in the nominative case. (vulpes, from which we get the English word vulpine, or fox-like.)