How do I make a command block say the nearest player's name in chat in MC Bedrock Edition?
You can do it with this command:
/say Congratulations @p, you win
You can use any other target selector if you prefer that, you can even use @a, or @e, which will return a list with all the specified players/entities, separated by ,
.
This, for example, will say "Congratulations Pig, Pig, Pig, you win", if there are 3, or more pigs in your world and you haven´t renamed them:
/say Congratulations @e[type=pig,c=3], you win