Don't buy a guitar solely on its appearance. You may be temped by some beautiful looking instrument only to find that it makes a sound like a leaky bucket. Sound is what you are looking for.
Your guitar should have a round, full tone in the bass and a singing, sustained sound on the top strings. Some guitars, because of bad construction, will sound flat and woody, with a muffled tone even on the open strings. Others will be over balanced on the bass side, with nothing in the treble but a tinny tinkle.
Draw your plectrum or the fleshy part of your thumb across the strings mid-way between the bridge and the end of the fingerboard. Does the sound ring on for some time after the stroke, or does it die almost immediately? If it fades too quickly try another, try another in any case, because it will give you some basis for comparison.
The chances are that the guitar will be out of tune, so ask the dealer to put it in tune for you before trying it. If he doesn't know how, he hasn't any business selling guitars. After all, would you buy a car from a salesman who didn't know how to drive?
If you try several instruments you will find a surprising difference in their tonal quality and sustaining power. And these differences may not always bear any apparent relationship to cheap price. Sometimes, because of the strange vagaries of the guitar maker's craft, which is more of an art than a science, a cheap guitar may have a better tone than a more expensive one.
I stress the matter of the tone particularly because it is of prime importance, but you must also remember that tone is some extent a subjective matter and people have different opinions. What you should be looking for is a sound that pleases you, personally.
Within the obvious limitations of your pocket your instrument should give you the best possible value for you money. But the way, if you have a friend who is already a player, do your best to persuade him to go along with you and help in this testing. For one thing, he will already be aware of many of the points raised here, and for another you will be able to listen to him playing the guitars and get a truer impression of their qualities.