I've always purchased used. Just recently purchased a 2012 Scion iQ and a 2016 Audi Q5.
Cars lose their value extremely fast, and if your planning on reselling then I would definitely purchase a Toyota or Honda so the name holds the value more so then the Year/Mileage of the car.
One thing to keep in mind if buying from a private seller vs dealer. If the private seller isn't willing to allow you to bring the vehicle to a mechanic to do a "Pre-Purchase Inspection" (Usually $60-$100). Then its probably best that you don't buy the car. -This will also help with possibly lowering the asking price. If you are buying from a dealer, the car should come with some type of warranty, or the option to add a warranty. If they don't provide a warranty, you might as well just save some money and buy from a private seller.
Honestly it is risky to buy any type of used car. Something to keep in mind or research is the cost of parts. I always check the make and model on eBay to see what the average cost of replacement parts are. If you find a mechanic that is willing to let you buy/bring your own parts, then you will definitely save money in the long run.
Good Luck!