If by "sustain" you mean resonance (sympathetic ringing of strings, as Ulf Akerstedt says), the closest you can get is a digital piano whose notes are recorded samples of the notes on a high-quality acoustic piano. The acoustic piano's resonance is recorded with the sampled notes. It's not exactly the same but it has a lot more richness than a synthesized sound.
If by "sustain" you mean "sustain pedal," that's pretty simple to determine. Check the input jacks of the instrument to see if there is one marked "Sustain." Usually it's a 1/4" jack. That's where a sustain pedal plugs in. The pedal might come with the instrument or you might have to buy it separately. They usually cost around US $25.
If by "sustain" you mean "decay time" of the sound (the time it takes the sound to get softer and softer and eventually stop), many keyboards and digital pianos allow you to modify the decay time, either as an option on its own or by changing a reverb setting. More reverb = longer decay time.
I don't know if we are allowed to recommend brands here, but any instrument's documentation should say whether notes are synthesized or sampled, what the sample source is, decay and reverb options, and whether sustain pedal is an option. Check out those details as you shop.
To save money: avoid instruments with more computer capacity than you need (e.g. built-in sequencers or other DJ software), and look for instruments that are just the keyboard part and a simple folding stand, not the full piano-like cabinet structure.