你怎么样?and 你好吗?could be used as general greeting. The difference is: when people say 你好吗?mostly they just want to say "hello", and you can just reply with "挺好","还好","好",etc. While, when people say"你怎么样?" it means they knew you before(proberbly your are friends), they are caring about how everything is going or did anything changed for you( your job, your health,etc), then you are expected to reply with some specific answers, like "I made a new girlfriend","I was promoted","I moved to the west from the south of the city."etc