Well, that depends. Do you want to collect the pig, or just kill it? .223 is a good varmint and small animal gun, but I wouldn't ethically use it on deer or other game animals of the same size. .243 is a capable deer round for most close in shooting, but really runs out of steam at range. .308 is, to me, the functional minimum for deer hunting at range.
That being said, if you just want to blast varmints, and make sure the pigs die, and you just want to shoot paper at 500 yards, then go .223. If you'd like a slightly more powered round to maybe make the pigs die somewhere nearby, and maybe go deer hunting, then get a .243. If you want the pigs to die close or on the spot, and if you want to shoot animals at long yardages, get a .308.
Some people have different thoughts on feral hogs. The state classifies them as nuisance exotics, and thus they are not a game animal, per se. (This is why there is no season on them, and they belong to the landowner.) I have no ethical issues with blasting them with a light round and having them run off and die. Deer, on the other hand, are a natural resource whose hunting is sanctioned by the sate, and thus, deserve a rifle with enough power so that you can find them after they expired, and not waste the animal. Thus my comments on different "power minimums" for deer and pigs, sorry for the length.