Wiring colours in modern installations are supposed to be harmonised across Europe, in which case you've got
- Earth (Gn/Yw, or bare wire sleeved at the ends). This is always earth unless you've had some very dodgy work done in the past. A voltmeter between this and some independently earthed metal should show near-zero volts; if you see 0V, and you've got a resistance meter, it should show only a few Ohms (I get 1 Ω from my earth line to my incoming water and gas pipes, but my conveniently-placed garage door frame isn't earthed).
- Neutral (blue). Blue has also been used for one of 3 phases, in some parts of Europe at least, but not combined with brown and black like that.
- Live (brown)
- Another live (black) - probably. This fits with your assumption, but black has also been used for neutral in fixed wiring.
Another possibility is that there are 3 phases supplied, and 2 have been taken to the garage for different circuits at some point in the past - perhaps lighting on one and sockets on another to avoid too much load on one.
I'd check carefully that there isn't a grey wire cut off short, because brown/black/blue/earth isn't a common combination, but brown/black/grey/blue/earth would be 3-phase and neutral. If there is a grey, don't assume it's not live until you've checked.
It's possible that the cable used wasn't quite the right on for the job but had the right number of cores, hence why I've suggested a few additional possibilities, some of which may not be proper in Germany (or here in the UK) but creative shortcuts can't be ruled out except by testing.