1st dont worry... its completely normal for chidlren to do this sort of thing!
also remember that no child has ever starved themselves to death, rather than eat!
also stop feeding what you think he wants to eat.... and start feeding what you want him to eat
basically:
give him breakfast at breakfast time... what u want him to have.
If he eats great, loads of praise, if not take it away and forget all about food until lunch time
at lunch time offer meal
if eaten great... maybe offer a pudding.... yogurt etc.... (or what you want him to have)
if not take away and forget about food til tea time
at tea time offer what you want him to eat. If eaten great.... if not forget about it til breakfast time
repeat the above for as long as it takes for 2 year old to realise that the food that is offered is all that thre is
needless to say dont offer any snacks between meals for a child who hasnt eaten / most of their main meal.
Also if they dont eat only offer water until the next meal
it wont take more than a few days max for hungry child to start eating!
PS i started a new nanny job in september.... my 3 year old charge ate "sauasegs, fishfinger, beans, cheese, ham, chips, mash and plain pasta...
since being there he now eats literally ANYTHING..... casserole, pasta bake, fish (now LOVES salmon, spag bol, curry, rice, any fruit and veg, etc, jacket potoes including skin, salad, chilli con carne, ANYTHING!
good luck!