Both of these are correct. In 1) you are asking whether you can ride horses if you like them. In 2) you are saying (not asking) that since you like hamsters, you want one as a pet.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.