With
A2:C2 containing numbers or blanks...

Try this:
D2: =SUBSTITUTE(TRIM(A2&" "&IF(B2=A2,"",B2)&" "&IF(OR(C2=A2,C2=B2),"",C2))," ","~")
Does that help?