Looking up string by number (how to make a suitable table ?)

I wish to replace some data with text:
if uint16_t is 267 then make a="some text"

The thing is that there is that the numbers+strings are not consecutive.

not like
1="stringone"
2="anotherstring"

it's more like:
4="astring"
76="something else"
433="more"

I'd like to avoid an crazy-big switch and case...

I'd like to avoid an crazy-big switch and case...

Then an array of numbers and an array of strings is in order. Use a for loop to iterate over the array of numbers. If the number in the array is the number of interest, the same index can be used to access the correct data from the string array.

AndreK:
I wish to replace some data with text:
if uint16_t is 267 then make a="some text"
I'd like to avoid an crazy-big switch and case...

extending @PaulS's comments, you could use a struct to organize your data:

struct myStruct{
  int myNumber;
  char* myText;
};

const myStruct myArray[] = {
  {4, "astring"},
  {76, "something else"},
  {433, "more"}
};

void setup() 
{
  Serial.begin(9600);
  int myValue = 76;
  for(int i = 0; i < sizeof(myArray)/sizeof(myArray[0]); i++)
  {
    if (myArray[i].myNumber == myValue)
    {
      Serial.println(myArray[i].myText);
    }
  }
}

void loop() 
{
}

The thing is that there is that the numbers+strings are not consecutive.

So, make an index.

@BulldogLowell - thank you, the example is very informative.