If you are using Ant, you owe it to yourself to check out Ant-contrib, a great collection of really useful tasks that make writing highly functional Ant scripts a snap.
For example, there's a <if> task that lets you write in conditional logic, like this:
<if>
<equals arg1="${target}" arg2="windows" />
<then>
<antcall target="build-windows"/>
</then>
<else>
<antcall target="build-solaris"/>
</else>
</if>
As you can see, the <if> task supports <else> conditions, and also supports <elseif>. It can test on any condition that Ant's built-in <condition> task can, such as equality, the availability of a property, whether file(s) are up to date, even if a document is available via an http request.