This awk-solution should do the job
awk -F\| 'BEGIN{OFS=" "}{str=""
str=sub("3a",$0) ? str : str"3a"
str=sub("3b",$0) ? str : str"3b"
str=sub("3c",$0) ? str : str"3c"
str=sub("3d",$0) ? str : str"3d"
if(str != ""){gsub(/[abdc]/,"& ",str)
$0=$1" -"str
print $0}}' test
Limitation: The first column must not contain "a", "b", "c", or "d".
Output:
123 -3c 3d
636 -3a 3d
More robust if the "-" is not required:
awk -F\| '{str=""
str=sub("3a",$0) ? str : str"3a"
str=sub("3b",$0) ? str : str"3b"
str=sub("3c",$0) ? str : str"3c"
str=sub("3d",$0) ? str : str"3d"
if(str != ""){gsub("3"," 3",str)
print $1""str}}' test
Output:
123 3c 3d
636 3a 3d