I have scenario like need to add 2 master pages for same site. And need to give the permission like one master page let say masterPageA will be act as anonymous When user have required permission they can see the another master page i.e masterPageB. Is it possible in SP?
That may be possible if you develop (I mean: C#, Visual Studio, etc.) a custom module.
More precisely, you would develop an HTTP module. It would check the current status of the request (authenticated or not), and switch the master page on the fly from the
PreInit event. See for instance http://ranaictiu-technicalblog.blogspot.com/2009/10/sharepoint-dynamically-change-master.html (section "Develop a HttpModule to attach PreInit event handler").