Of the long list of bowlers in the top tier of Test cricket that AK84 put up, I don’t think I’d take Anderson over any of them to be honest (unless the match is being played in great seam/swing conditions - then I’d consider dropping the odd one, but not many of them, for Anderson) - with one exception. Anderson is definitely a better bowler over the totality of his career than Botham was.
Botham’s career with the ball can be split into two: up to and including 1981 and post 1981. Prior to the start of 1982, Botham was a very fine bowler indeed - averaging 21.95 and taking 277 of his wickets. Post 1982, he averaged 36.9 until the end of his career. This earlier period also coincided with World Series of Cricket, so some of the sides were missing their best players, who were excommunicated from international cricket for siding with Packer, which may help his numbers. Basically Botham got injured, then slow and then out of condition, and played better opposition.*
So when it comes to a comparison with Anderson, I think I’d rather have the lengthy career (even post 30, Anderson’s numbers pass muster with Botham) than Botham’s figures. Obviously more to Botham than just the ball but still, as a bowler, I think even Botham would say Anderson was better than him.
I think Anderson is in that second tier - with the exception of his incredible longevity providing a long peak, which may make people weigh it differently - but if I needed someone to take a wicket for my life, unless the conditions suit, I’m looking at Marshall and some of the others in the top list. Don’t think I’d put Brett Lee in that second tier. Andy Roberts/Thommo might be in the class above it too but I’d have to bow to the people who saw them bowl I reckon.
*Due to cricket not being on for a while earlier this summer, many documentaries got trotted out to try and keep people entertained - one of which was about English cricket in the 1980s and they talked a bit about Botham’s record against Australia in particular. He took a 5-fer, bowling barely in the mid-70s mph, on one Ashes tour in the mid-80s and, watching the wickets, it beggars belief; he’s just dobbing it down. In the final episode of the doc, Mark Taylor talks about facing him and starting to lay into Botham - Border is at the other end and tries to tell Taylor to take it easy, that Botham is wily and laying a trap, and Taylor tells him that if he’s going to bowl this badly, he, Taylor, will flay him. Botham had some kind of weird hoodoo over the Aussies from the 80s (probably due to 1981) but no one else respected him like they did. Botham’s record against the Windies with the ball in the 1980s is particularly poor.