It all depends on the price. Usually, the more expensive the piano, the better it is. I'll list the best brands for each price range:
$1,000 - $7,000 : Yamaha
$9,000 - $15,000 : Bohemia
$15,000 - $25,000 : August Forster
Anything under $1,000 is probably going to be a piece of crap. Yamaha pianos are very good quality for the price. Just because they're in the cheapest class doesn't mean they're bad in any way. The Bohemia and A.F. are a lot better though, but they're quite expensive. I haven't listed anything above $25,000, because then you'd be better off going for a grand piano. Before you buy anything, play it.
An acoustic piano is always better than a workstation. There is no digital piano under $15,000 which can successfully recreate the touch and sound of an acoustic piano.
A few more things: if you're going to buy a second-hand piano, make sure you bring along someone who knows a lot about pianos to play it before you buy anything. You should check the soundboard for cracks, and try all the keys to see if any of the hammers get stuck. Also, is there a professional piano tuner in your area? You should also watch out for fluctuating humidity in the room you're planning to put the piano in. Buying an adjustable piano bench is necessary.