Using different Templates depending on Ticket attributes

Hi,
what’s the recommended way to use different Templates for the same action (and
same queue) depending for instance to the subject of the Ticket ?
I want to send different answers in my Autoreply mail.
Currently I have implemented it by using perl code in my (queue specific)
template (Solution I).
Another way would be, to have two scrips with the same conditions , different
prep. code and using two templates (II)
or changing the templates name within my scrip action (how? ) (III) .

Another usage for this requirement would be to have templates in different
languages an switching the language by using a custom field.

Which solution is the best to this ?

Rolf Schaufelberger