WA understands some Mathematica commands.
You can search for those commands here
Searching for piecewise there provides documentation.
This appears to work in WA
piecewise[{{x^2,x<0},{x+2,0<=x<=2},{4,x>2}}]
This might be what you want.
f[x_] := Piecewise[{{x^2, x < 0}, {x + 2, 0 <= x <= 2}, {4, x > 2}}] Plot[f[x], {x, -4, 4}]
Thank you for your thoughtful response. I copied and pasted it, and it appeared immediately.
Thank you for your very kind reply. I copied and pasted it and it came out right away.
thank you so much,I didn't know that English speakers call this a piecewise. now i know