Dear Stefan,
as others already have pointed out, for Axiom, your question is not
really well posed.
In Axiom
if x<10 then 2*x else 5*x^2
is *not* an expression (as you might know it from other untyped CAS
like Mathematica or Maple), but rather a programming language
construct. In other words, if Axiom sees this, it is evaluated. So the
result is either 2*x or 5*x^2 depending on the (boolean) outcome of
the evaluation of x<10.
I think, Bill suggested to use something like InputForm. There it
would be possible to represent an if-expression unevaluated.
But you should rather say what you actually want (it's not the same
what you expect).
In order for us to suggest you a proper way to handle your use case,
you should tell us why you want a piecewise function and (more
important) what you later want to do with that function.
Until we have that information, everything would be just digging in
the dark.
Ralf