I'd like to ask someone what was the company that they worked with. I'm not sure this would be understandable, but the point is that I want to know the name of the companies that someone has been working with before. It is not about asking which company have they worked for.
And there are two examples.
1) Which companies have you been working with?
2) Which companies have you worked with?