The formal rule is this: something is declarative and anything is interrogative or negative. Then, there's usage. Also, this is not the entire story on something, anything and nothing, which are similar to some, any, and none in usage.
- He wants something to eat right now.
- Does he want anything to eat right now?
- He doesn't want anything to eat right now.
However, you can also use something in the interrogative:
- Does he want something to eat right now?
Then, there's negative interrogative:
- Doesn't he want something or anything to eat right now?
What is not used is: He wants [declarative] anything to eat right now. The declarative has to be something. Unless you are mean:
I want (just) anything at all to eat. That's how hungry I am.
All the above fits with the verb: I'd like.