How can I use VLOOKUP (or another way) to return multiple values. For example, in the list:

A 1
B 3
C 4
B 2
B 1

I want to search for the value B which corresponds to values 3, 2 and 1.

I would like to output this into seperate horizontal cells in a format like:
A 1
B 3 2 1
c 4

Is this possible? If so, how would i go about doing this?