To change the branch from Civil to CS, you should have scored a CGPA of 9.8 or 10 in 1st year. It is not a big deal since the students are out of IIT preparations and you can easily do it. But there must be seats in the CSE branch and there are not too many people who are also opting for branch change.
If you lower your CGPA below 9.5 then it is difficult to get your branch upgraded in PEC. If you are doing only study and overcomes all difficulties or just mugs things up then there is more chance of getting the branch change because CSE students generally get 7-8 CGPA.
You can also try to learn to code like hell while you are still in Civil and then you can surprise everyone by being the best coder ever being in the Civil branch. This will give you an upper hand among the actual CS student during any interview.