kindly explain me how access list works in layer 2 switches , though layer 2 switch will forward traffic based on CAM table .
How access list statement is excute inside switch processor though access list hold ip address .
It depends on what type of switch you are talking about. Some switches operating at layer 2 have a TCAM ASIC that is capable to look up to IP/TCP layer and filter based on that. So you can apply ip access-list even on a layer 2 switches.
But again it all depends on the switch type.