Arduino Project Code HELP!

So this probably has a very simple solution if you have the know how, but basically what i am trying to do is program 3 different LED lights to turn on according to a persons distance from the sensor.

I want to make it so that the first light triggers when you are far away,

when you get closer the second light triggers and the first turns off,

process repeats for the third light.

So far i have figured out how to get distance readings in CM from the ultrasonic distance finder but don’t know how to tell the Arduino how to take that reading and command the leds with it. Please help!

Use case statements.

Arduino Example "switchCase"
Instead of analog read, you are using your sensor data

  Switch statement
 Demonstrates the use of a switch statement.  The switch
 statement allows you to choose from among a set of discrete values
 of a variable.  It's like a series of if statements.
 To see this sketch in action, but the board and sensor in a well-lit
 room, open the serial monitor, and and move your hand gradually
 down over the sensor.
 The circuit:
 * photoresistor from analog in 0 to +5V
 * 10K resistor from analog in 0 to ground
 created 1 Jul 2009
 modified 9 Apr 2012
 by Tom Igoe 
 This example code is in the public domain.

// these constants won't change. They are the
// lowest and highest readings you get from your sensor:
const int sensorMin = 0;      // sensor minimum, discovered through experiment
const int sensorMax = 600;    // sensor maximum, discovered through experiment

void setup() {
  // initialize serial communication:

void loop() {
  // read the sensor:
  int sensorReading = analogRead(A0); 
  // map the sensor range to a range of four options:
  int range = map(sensorReading, sensorMin, sensorMax, 0, 3);

  // do something different depending on the 
  // range value:
  switch (range) {
  case 0:    // your hand is on the sensor
  case 1:    // your hand is close to the sensor
  case 2:    // your hand is a few inches from the sensor
  case 3:    // your hand is nowhere near the sensor
  delay(1);        // delay in between reads for stability

based off of that code right there would it automatically dim the light or does it just write the words “dim” or bright in the serial monitor?

This just writes the word, but it is just an example to show you what you can do. Read the comments that are within the code.