This is an interesting question! My thoughts are that Nintendo will outlive Sony, but not Microsoft. But it's very difficult to gauge, and honestly I wouldn't like to place any money on it.
First of all, the current success of the Switch in no way reflects possible future success. The Wii did amazingly well...but anyone remember the Wii U? The 3DS has lifetime sales of about half of the original DS, and the Gameboy Advance is quite a bit behind the Gameboy and Gameboy Color. Whilst their handhed devices have always done very well, in the home console market Sony have almost-always performed better than Nintendo, with the sole exception to this being the Playstation 3, which is behind the Wii in terms of lifetime sales. Nintendo are a difficult company to gauge because they have no historical trend of success: some of their consoles perform poorly, and others perform brilliantly. Microsoft are in the same boat, being the youngest of the three, but I think they have other advantanges that Nintendo don't have which sets them up for a more promising future.
Microsoft have potentially far more staying power thanks to their computer hardware and software. Microsoft have more symmetry with the PC gaming market than either Nintendo or Sony and that's a HUGE advantage, because PC gaming has been growing in popularity over the years. Microsoft have already capitalised on this to some extent with the Game Pass, and with the Xbox Series X being more of a multimedia machine than a dedicated games console, they're setting themselves up for the long-term. Dedicated games consoles aren't going to be around forever, and when they are no longer profitable Microsoft are going to have been in a position for years where they've been creating systems that integrate other features. Nintendo and Sony will not have been...Nintendo especially, because their more recent devices ONLY play video games. This will need to change if they hope to outlast their competitors, because it's just not going to be enough. There's nothing to say that this won't be ironed out in the future - we're already getting Nintendo games on smartphones, and a willingness to work with Microsoft in terms of cross-play compatibility - but Microsoft are going to have the head start and the advantage if things go this way. Honestly, if they'd just go all-in and make an easily upgradable and affordable Xbox PC they would probably dominate the industry in terms of sales.
Nintendo have always done things their own way, and whilst this can work in their favour, it can also work against them. In terms of video games and industry practices, they seem to be willing to let their competitors take all the risks before jumping on the bandwagon themselves: we've only recently (comparatively speaking) started getting DLC and paid services in their products, and they've been around for much, much longer elsewhere. They've become the accepted thing to do now, so Nintendo haven't had to weather any backlash...although they bloody well should have with crap like Mario Kart Tour and Sword and Shield's expansion pass. But I digress. Nintendo doing things their own way makes them frustratingly archaic by comparison - the Switch uses CARTRIDGES, for crying out loud! The console UI is an absolute mess. The hardware is painfully outdated. The quality of the product build is also something that has attracted a lot of heat, and that's unusual for Nintendo, who have made handhelds that
can survive bomb explosions. Also, they just will not capitalise on their assets: Nintendo are practically deaf to their fans, and whilst this might be a minority viewpoint, the fact remains that they are sitting on a HUGE library of classic games that they could make some very easy money from and they're doing nothing with it other than asserting their right to do nothing with it. The best way to fight the emulation scene is to make these things available in an affordable and desirable form, not issue copyright takedowns on ROM sites and fan games and piss everyone off. Do Nintendo do that? In a limited fashion with Switch Online, yes, I suppose they do, but their abandoning the Virtual Console - which had its flaws, but was still better than what we currently have - has not done them any favours.
And Nintendo's IP is it's biggest strength - if anything is going to make them outlive Sony and Microsoft, it'll be their core IPs. They have access to Pokemon, the largest media franchise in existence. Bigger than even DISNEY, and Disney has been around for 96 years, almost four times longer than Pokemon, and Disney's expansion over the last few years has been overwhelming: they own Marvel, they own Star Wars. Their movies are raking in terrifying amounts of money. They STILL don't match Pokemon's revenue. Nintendo might trail in the wake of Sony and Microsoft when it comes to industry practices, but they definitely set the standards of quality in their games. Practically every Action-Adventure is compared to Zelda in some form. Platformers are compared to Mario. Any RPG that has a creature capture mechanic is compared to Pokemon. Nintendo could easily stay relevant if they stopped making dedicated games consoles just by making games.
I've not talked much about Sony, because I'm not really sure where they sit in all this...I think if Nintendo are going to outlive anyone, it'll be Sony. Sony doesn't have the symmetry with PC gaming that Microsoft does, and it doesn't have the IP recognition that Nintendo does. Once the Playstation bubble pops, there's not much left for them. Sony have really carved a name for themselves with some amazing first-party exclusives this generation - the PS4 is currently the fourth best-selling console of all time too, it is FAR from being a disappointment - but, again, past success is no reflection of future success, and there's no guarantee that the PS5 will perform as well. The PS3 was an absolute disaster when it first launched, and even after recovering, it was Sony's poorest performing console. I think Sony will struggle the most to stay relevant in the future, if things continue as they have been.
With all this said: it's impossible to predict the future. If Xbox Series X crashes and burns, Microsoft could abandon the industry first. If the PS5 has a worse launch than the PS3, Sony could fold. If the Switch's successor repeats the Wii U's performance, that could be it for Nintendo. It is HIGHLY unlikely that will happen, because the amount of revenue generated by video games is staggering, and despite the constant claims that gaming is going to hit a technology barrier, or that smartphones will kill gaming, or that people don't want just video game consoles anymore, nothing suggests that this is going to happen within the next decade.
Also, something kinda interesting that I think worth bringing up is that
Nintendo's brand intimacy in the US is actually behind both Sony and Microsoft, with Microsoft being the only one of the three who have gone up this year. That's very interesting, considering the Switch's success. It doesn't really indicate anything - at least, not right now, and not by itself - but it's an interesting thing to see.